package com.example.config;

import org.springframework.beans.factory.annotation.Autowired;
import org.springframework.context.annotation.Configuration;
import org.springframework.web.servlet.config.annotation.InterceptorRegistry;
import org.springframework.web.servlet.config.annotation.WebMvcConfigurerAdapter;

import com.example.filter.LoginIntercepter;

@Configuration
public class WebConfig extends WebMvcConfigurerAdapter {
   
	@Autowired
	private LoginIntercepter LoginIntercepter;
	@Override
	public void addInterceptors(InterceptorRegistry registry) {
		// TODO Auto-generated method stub
	    registry.addInterceptor(LoginIntercepter).addPathPatterns("/*").excludePathPatterns("/user/login","/index",
	    		"/indexLogin","/tokenVerify","/successLogin","/user/logout");
	  
	    super.addInterceptors(registry);
	}
	

}
